{extend name="shop/blue/base" /}
{block name="resources"}
<link type="text/css" rel="stylesheet" href="__TEMP__/{$style}/public/css/goods.css">
<script type="text/javascript" src="__TEMP__/{$style}/public/js/jquery.lazyload.js"></script>
<style>
.goods-promotion{
	background: url(__TEMP__/{$style}/public/images/seckilling.png);
	height:35px;
	line-height: 35px;
	color:#ffffff;
	padding-left:15px;
}
.sprite-seckilling{
	height:20px;
	width:20px;	
	background-image: url(__TEMP__/{$style}/public/images/i__sprite.png);
	background-position: -20px 0;
	display:inline-block;
	vertical-align: -4px;
	margin-right:5px;
}
.promotion-text{
	font-size:16px;
}
.promotion-time{
	float:right;
	padding-right:15px;
}
.promotion-time span{
	display: inline-block;
	background-color: #fff;
	border-radius: 2px;
	color: #0689e1;
	font-size: 10px;
	line-height: 16px;
	text-align: center;
	padding: 0 1px;
	min-width: 14px;
	position: relative;
	top: -1px;
}
</style>
{/block}
{block name="main"}
<input type="hidden" id="hidden_province" value="{$user_location.province}" />
<input type="hidden" id="hidden_city" value="{$user_location.city}" />
<div class="w1210">
	<div class="breadcrumb clearfix">
		<a href="SHOP_MAIN" class="index">首页&nbsp;&gt;&nbsp;</a>
		<span class="last" style="cursor: pointer;" onclick='location.href="SHOP_MAIN/goods/goodsinfo?goodsid={$goods_info.goods_id}"'>{$goods_info.category_name}{$goods_info.goods_name}</span>
	</div>
	<!-- 商品详细信息 -->
	<div class="goods-info">
	<!-- 商品图片以及相册 _star-->
		<div id="preview" class="preview">
			<div class="goodsgallery"><!-- 商品相册容器-->{include file="shop/blue/Goods/controlGallery" }</div>
			<div class="goods-gallery-bottom">
				<!-- <a href="javascript:;" class="goods-compare compare-btn fr add-compare"><i></i> 对比</a> -->
				<a href="javascript:;" class="goods-col fr collect-goods">
					<i {if condition="$is_member_fav_goods>0"}style="background-position: -112px -91px;"{/if}></i>
					<span data-collects="{$goods_info.collects}">收藏商品 ({$goods_info.collects}人气)</span>
				</a>
				<!-- <div class="bdsharebuttonbox fr bdshare-button-style0-16">
					<a class="bds_more" href="#" data-cmd="more" style="background: none; color: #999; line-height: 25px; height: 25px; margin: 0px 10px; padding-left: 20px; display: block;">
						<i style="width: 13px; height: 13px; background: transparent url(__TEMP__/{$style}/public/images/goods-icon.png) no-repeat -113px -65px; vertical-align: middle; display: inline-block;"></i> 分享
					</a>
				</div> -->
			</div>
		</div>
				<!-- 商品图片以及相册 _end-->
				<!-- 商品详细信息 _star-->
				<div class="detail-info">
					<form action="" method="post" name="formBuyNow" id="formBuyNow">
						<!-- 商品名称 -->
						<h1 class="goods-name js-goods-name">{$goods_info.goods_name}</h1>
						<!-- 商品简单描述 -->
						<p class="goods-brief color">{$goods_info.introduction}</p>
						<!-- 限时折扣 -->
						<input type="hidden" id="end_time" value="{$goods_info['promotion_detail']['end_time']}"/>
						<div class="goods-promotion">
							<i class="sprite-seckilling"></i>
							<span class="promotion-text">限时折扣</span>
							<div class="promotion-time">距离结束仅剩
								<span class="c-red js-day">00</span> 天 
								<span class="c-red js-hour">00</span> 时 
								<span class="c-red js-min">00</span> 分 
								<span class="c-red js-sec">00</span> 秒 
							</div>
						</div>
						<div class="goods-price">
							<!-- 商品不同的价格 -->
							<div class="show-price">
								<span class="price">原&nbsp;&nbsp;&nbsp;价</span>
								<font class="market-price">￥{$goods_info.price}</font>
							</div>
							<div class="realy-price">
								<div class="now-prices">
									<span class="price">销售价</span>
									<strong class="p-price second-color" id="price">￥{$goods_info.promotion_price}</strong>
									{if condition="$goods_info.point_exchange>0"}
										{if condition="$goods_info.point_exchange>0"}
										<strong class="p-price second-color" style="font-size:22px;" id="member_point">+{$goods_info.point_exchange}积分</strong>
										{/if}
									{/if}
								</div>
								<!-- <div class="depreciate">
									<a href="" title="">（降价通知）</a>
								</div> -->
							</div>
							
							
							{if condition="$goods_info.is_show_member_price == 1 "}
							<div class="realy-price">
								<div class="now-prices">
									<span class="price">会员价</span>
									<strong class="p-price second-color" id="member_price">￥{$goods_info.member_price}</strong>
									{if condition="$goods_info.point_exchange_type==1 && $goods_info.point_exchange>0"}
										<strong class="p-price second-color" style="font-size:22px;" id="member_point">+{$goods_info.point_exchange}积分</strong>
									{/if}
								</div>
							</div>
							{/if}
							{if condition="$goods_info.max_buy!=0"}
							<!-- 限购 -->
							<div class="prom-gift" >
								<div class="dt">限购数量</div>
								<div class="dd">
									<span class="prom-gift-label">
								<em>{$goods_info.max_buy}个</em>
								</span>
								<div></div>
								</div>
							</div>
							{/if}
							{if condition="$goods_info.mansong_name neq ''"}
							<div class="shop-prom">
								<div class="shop-prom-title">
									<dt class="dt">本店活动</dt>
									<dd>{$goods_info.mansong_name}</dd>
<!-- 									<a class="more">更多活动<i></i></a> -->
								</div>
<!-- 								<div class="shop-prom-Box"> -->
<!-- 									<div class="floater"> -->
<!-- 										<div class="hd"> -->
<!-- 											<em class="title">本店活动</em> -->
<!-- 											<ul class="bd"> -->
<!-- 												<li><a href="" target="_blank" title="">{$goods_info.mansong_name}</a></li> -->
<!-- 											</ul> -->
<!-- 											<a class="more unmore">收起<i></i></a> -->
<!-- 										</div> -->
<!-- 									</div> -->
<!-- 								</div> -->
							</div>
							{/if}
						</div>
						
						<!-- 在售的商品 _start -->
						<!-- 运费 -->
						 <div class="freight">
							<div class="dt">配送至</div>
							<div class="dd">
								<div class="post-age">
									<div class="region-chooser-container region-chooser" style="z-index: 3">
										<div class="region-chooser-selected">
											<div class="region js-region">
												<font>{$user_location.province}{$user_location.city}<i></i></font>
											</div>
										</div>
										<div class="region-chooser-box" id="region-chooser-box" style="display: none;">
											<div class="region-chooser-close"></div>
											<div class="region-tabs">
												<div class="region-tab selected" data-region-level="1" style="display: block">
													{$user_location.province}<i></i>
												</div>
												<div class="region-tab" data-region-level="2" style="display: block">
													{$user_location.city}<i></i>
												</div>
												<div class="region-tab " data-region-level="3" style="display: block">
													请选择区/县<i></i>
												</div>
											</div>
											<div class="region-items" data-region-level="1"  style="display: block;"></div>
											<div class="region-items" data-region-level="2" style="display: none;"></div>
											<div class="region-items" data-region-level="3" style="display: none;"></div>
										</div>
										<div style="clear: both;"></div>
									</div>
									<div class="post-age-info">
										{if !empty($shipping_name)}
											{if empty($shipping_name[0]['company_name'])}
												{$shipping_name}
											{else}
												<select class="select_freight">
												{foreach name="shipping_name" item="vo"}
													<option value="{$vo.co_id}">{$vo.company_name}&nbsp;&nbsp;&nbsp;¥{$vo.express_fee}</option>
												{/foreach}
												</select>
											{/if}
										{else/}
											无货
										{/if}
									</div>
								</div>
							</div>
						</div>
						<!-- 评价、销量、积分 -->
						<div class="info-other">
							<ul class="other">
								<li><p>累积评价<span><a id="evaluate_num" href="#" class="color">{$evaluates_count['evaluate_count']}人评价</a></span></p></li>
								<li><p>累计销量<span class="color">{$goods_info.sales}</span></p></li>
								<li class="last"><p>赠送积分<span class="color">{$goods_info.give_point}</span></p></li>
							</ul>
						</div>
						<div class="choose js-skulist">
							<p class="choose-title">请选择您要的商品信息<b onclick="closePrompt(this)">x</b></p><br/>
							<input type="hidden" id="goods_sku_count" value="{$goods_sku_count}"/>
							<input type="hidden" id="attribute_list" value="{$spec_list}"/>
							{foreach name="goods_info['sku_list']" item="pro_skus" key="k"}
							<input type="hidden" id="goods_sku{$k}" value="{$pro_skus.attr_value_items};" stock="{$pro_skus.stock}" {if condition="$pro_skus.promote_price < $pro_skus.member_price" }price="{$pro_skus.promote_price}" {else/}price="{$pro_skus.member_price}"{/if} promotion_price="{$pro_skus.promote_price}" member_price="{$pro_skus.member_price}" skuid="{$pro_skus.sku_id}" skuname="{$pro_skus.sku_name}" original_price="{$pro_skus.price}" />
							{/foreach}
							{foreach name="goods_info['spec_list']" item="spec" key="k"}
							<dl class="attr">
								<dt class="dt">{$spec.spec_name}</dt>
								<dd class="dd">
									<ul>
									{foreach name="spec.value" item="spec_value" key="k"}
									{if condition="$spec_value['spec_id'] eq $spec['spec_id']"}
										<li class="goods-spec-item {if condition="$k==0 && count($goods_info['spec_list'])==1"} selected{/if}">
											{switch name="$spec_value.spec_show_type"}
													{case value="1"}
													<a href="javascript:;" title="{$spec_value.spec_value_name}">
														<span class="value-label" name="Span{$k}" id="{$spec.spec_id}:{$spec_value.spec_value_id}">{$spec_value.spec_value_name}</span>
														{if condition='$k==0'}
														<i></i><!-- 第一个选中 -->
														{/if}
													</a>
													{/case}
													{case value="2"}
													<!-- 颜色 -->
													<a href="javascript:;" title="{$spec_value.spec_value_name}">
														
														{if condition="$spec_value.spec_value_data == ''"}
														<span class="value-label" name="Span{$k}" id="{$spec.spec_id}:{$spec_value.spec_value_id}">{$spec_value.spec_value_name}</span>
														{else/}
														<span id="{$spec.spec_id}:{$spec_value.spec_value_id}">
															<b style="width:30px;height:30px;display:inline-block;vertical-align:middle;background: {$spec_value.spec_value_data};"></b>
															{$spec_value.spec_value_name}
														</span>
														{/if}
														
														{if condition='$k==0'}
														<i></i><!-- 第一个选中 -->
														{/if}
													</a>
													{/case}
													{case value="3"}
													<a href="javascript:;" title="{$spec_value.spec_value_name}">
														{if condition="$spec_value.spec_value_data == ''"}
														<span class="value-label" name="Span{$k}" id="{$spec.spec_id}:{$spec_value.spec_value_id}">{$spec_value.spec_value_name}</span>
														{else/}
														<img src="__UPLOAD__/{$spec_value.spec_value_data}" style="width:30px;height:30px;">
														<span class="value-label" name="Span{$k}" id="{$spec.spec_id}:{$spec_value.spec_value_id}">{$spec_value.spec_value_name}</span>
														{/if}
														
														{if condition='$k==0'}
														<i></i><!-- 第一个选中 -->
														{/if}
													</a>
													{/case}
												
											{/switch}
										</li>
										{/if}
									{/foreach}
									</ul>
								</dd>
							</dl>
							{/foreach}
							<!-- 购买数量 -->
							<dl class="amount">
								<dt class="dt">数量</dt>
								<dd class="dd">
									<span class="amount-widget">
										<input type="text" class="amount-input" value="1"  data-max="{if condition='$goods_info.max_buy==0' }{$goods_info.stock}{else/}{$goods_info.max_buy}{/if}"  title="请输入购买量" id="num" />
										<span class="amount-btn">
											<span class="amount-plus"><i>+</i></span>
											<span class="amount-minus"><i>-</i></span>
										</span>
										<span class="amount-unit">件</span>
									</span>
									<em class="stock js-goods-number">库存{$goods_info.stock}件</em>
								</dd>
							</dl>
							<!-- 限购提示语 -->
							<!-- 加入购物车按钮、手机购买 -->
							<div class="action">
								{if condition="$goods_info.state==1"}
									<div class="btn-buy">
										<a href="javascript:;" class="buy-goods color js-buy-now" data-tag="buy_now">
											<span class="buy-goods-bg bg-color"></span>
											<span class="buy-goods-border"></span>立即购买
										</a>
									</div>
									<div class="btn-buy"><a href="javascript:void(0);" class="add-cart bg-color" data-tag="to_cart"><i></i> 加入购物车</a></div>
								{else/}
									<div class="btn-buy"><a href="javascript:void(0);" class="no-auth ">该商品已下架 </a></div>
								{/if}
								
								{if condition="$goods_info.QRcode != ''"}
								<div class="btn-phone">
								<!-- APP_MAIN/Goods/goodsDetail?id={$goods_info.goods_id} -->
									<a href="javascript:;" class="go-phone">
		<!-- 								<span>手机购买</span> -->
										<i></i>
										<div id="phone-tan" style="left:53px;">
											<span class="arr"></span>
											<div class="m-qrcode-wrap">
												<img src="__UPLOAD__/{$goods_info.QRcode}" alt="二维码图片" width="100" height="100">
											</div>
										</div>
									</a>
								</div>
								{/if}
							</div>
				<!-- 服务承诺 -->
					</div>
					<!-- 在售的商品 _end -->
					<input type="hidden" id="hidden_shop_id" name="shop_id" />
					<input type="hidden" id="hidden_cart_id" name="cart_id" />
				</form>
			</div>
	<!-- 商品详细信息 _end-->
	</div>
	<!-- 搭配套餐 -->
	<!-- 内容 -->
	<div class="clearfix">
		<!-- 左半部分内容 提出来的  客服-->
		<div class="fl">
			<!-- 客服组 提出来的  客服，先隐藏掉
			2017年2月10日 08:40:53
			{1include file="shop/blue/Goods/controlCustomerCenter"}
			-->
			<!-- 排行榜 提出来的 【排行榜】-->
			{include file="shop/blue/Goods/controlStoreRank"}
		</div>
		<!-- 右半部分内容 -->
		<div class="right right-con">
			<div class="wrapper">
				<div id="main-nav-holder" class="goods-detail">
					<ul id="nav" class="tab">
						<li class="title-list current" data-index="1"><a href="javascript:;">商品属性</a></li>
						<li class="title-list" data-index="2"><a href="javascript:;">商品详情</a></li>
						<li class="title-list" data-index="3"><a id="evaluate_count" href="javascript:;">累计评价({$goods_info.evaluates})</a></li>
						<li class="title-list" data-index="4"><a href="javascript:;">购买咨询</a></li>
					</ul>
					<div class="right-side">
						<a href="javascript:void(0);" class="right-addcart js-buy-now" data-tag="buy_now"><i></i>立即购买</a>
						<div class="right-side-con" ><!-- style="height: 442px;" -->
							<ul class="right-side-ul">
								<li class="abs-active" data-index="1">
									<i></i>
									<span>商品属性</span>
								</li>
								<li data-index="2">
									<i></i>
									<span>商品详情</span>
								</li>
								<li data-index="3">
									<i></i>
									<span>商品评价</span>
								</li>
								<li data-index="4">
									<i></i>
									<span>购买咨询</span>
								</li>
							</ul>
						</div>
					</div>
				</div>
				<div id="main_widget">
					<!-- 规格参数 _star -->
					<div id="goods_attr_list" class="goods-detail-con goods-detail-tabs">
						{if condition ="count($goods_info.goods_attribute_list) gt 0"}
							<ul class="goods-spec">
								{foreach $goods_info.goods_attribute_list as $vo}
								<li>{$vo.attr_value}：<span id="goods_attr_" title="{$vo.attr_value_name}" class="goods-attr-value">{$vo.attr_value_name}</span></li>
								{/foreach}
							</ul>
						{/if}
					</div>
					<!-- 商品详情 _star -->
					<div id="goods_introduce" class="goods-detail-con goods-detail-tabs">
						<!-- 推荐商品 -->
						<!-- 商品后台上传的商品描述 -->
						<div class="detail-content goods-detail-content">
						{$goods_info.description}</div>
					</div>
					<!-- 商品详情 end -->
					<!-- 商品评价 start -->
					{include file="shop/blue/Goods/controlGoodEvaluate"}
					<!-- 商品评价 end -->
					<!-- 服务 start -->
					<!-- 常见问题 _star -->
					<div class="goods-detail-con goods-detail-tabs">
						{include file="shop/blue/Goods/controlPurchaseConsulting"}
					</div>
					<!-- 常见问题 _end -->
					<!-- 服务 end -->
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript" src="__TEMP__/{$style}/public/js/countdown.js"></script>
<script>
$(function(){
	countDown();//countdown.js
})
</script>
{include file="shop/blue/Goods/controlGoodsInfoData"}
{/block}